import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty } from 'class-validator';

/**
 * 登录DTO
 */
export class LoginDto {
  @ApiProperty({ 
    description: '用户名或邮箱', 
    example: 'john_doe' 
  })
  @IsString({ message: '用户名或邮箱必须是字符串' })
  @IsNotEmpty({ message: '用户名或邮箱不能为空' })
  usernameOrEmail: string;

  @ApiProperty({ 
    description: '密码', 
    example: 'password123' 
  })
  @IsString({ message: '密码必须是字符串' })
  @IsNotEmpty({ message: '密码不能为空' })
  password: string;
}